namespace Ds.DataBase.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class _20200702004 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.JiaoZhiGongInfoes", "zw_zwid", "dbo.ZhiWeis");
            DropIndex("dbo.JiaoZhiGongInfoes", new[] { "zw_zwid" });
            RenameColumn(table: "dbo.JiaoZhiGongInfoes", name: "KeShiZhiWu_id", newName: "kszw_id");
            RenameIndex(table: "dbo.JiaoZhiGongInfoes", name: "IX_KeShiZhiWu_id", newName: "IX_kszw_id");
            DropColumn("dbo.JiaoZhiGongInfoes", "zw_zwid");
        }
        
        public override void Down()
        {
            AddColumn("dbo.JiaoZhiGongInfoes", "zw_zwid", c => c.Int());
            RenameIndex(table: "dbo.JiaoZhiGongInfoes", name: "IX_kszw_id", newName: "IX_KeShiZhiWu_id");
            RenameColumn(table: "dbo.JiaoZhiGongInfoes", name: "kszw_id", newName: "KeShiZhiWu_id");
            CreateIndex("dbo.JiaoZhiGongInfoes", "zw_zwid");
            AddForeignKey("dbo.JiaoZhiGongInfoes", "zw_zwid", "dbo.ZhiWeis", "zwid");
        }
    }
}
